#include <glib.h>

static void g_regex_replace_test(void)
{
    GRegex *reg;
    gchar *res;

    gchar *ori = "abcd1234ghi56xyz";
    gchar *rep = "NUM";

    reg = g_regex_new("[0-9]+", 0, 0, NULL);
    res = g_regex_replace(reg, ori, -1, 0, rep, 0, NULL);

    g_print("ori:%s \n", ori);
    g_print("res:%s \n", res);

    g_free(res);
    g_regex_unref(reg);

    return;
}

int main (int argc, char** argv)
{
    g_regex_replace_test();

    return 0;
}
